package com.sunlands.zlcx.usercenter.client;

import com.sunlands.zlcx.usercenter.config.OauthFeignConfig;
import com.sunlands.zlcx.usercenter.vo.feign.UserRelationVO;
import com.sunlands.zlcx.usercenter.vo.response.BusinessResult;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author anjl
 */
@SuppressWarnings("unused")
@FeignClient(value = "tz-user-friend", configuration = OauthFeignConfig.class)
public interface UserFansService {
    /**
     * 查询当前用户和其他用户的关联关系
     * @param userIdA userIdA
     * @param userIdB userIdB
     * @return
     */
    @ApiOperation(value = "用户关系", notes = "用户关系")
    @GetMapping("/user/relation")
    BusinessResult<UserRelationVO> relation(@ApiParam(value = "用户id - a",required = true)@RequestParam(name = "userIdA") Long userIdA,
                                            @ApiParam(value = "用户id - b",required = true)@RequestParam(name = "userIdB") Long userIdB);

    /**
     * 查询当前用户和其他用户的关联关系
     * @param userId
     * @param friendsUserIds
     * @return
     */
    @GetMapping("/user/relation/list")
    BusinessResult<List<UserRelationVO>> relationList(@ApiParam(required = true)@RequestParam(name = "userId") Long userId,
                                                             @ApiParam(required = true)@RequestParam(name = "friendsUserIds") List<Long> friendsUserIds);


}

